package com.itheima.myextends.方法重写的注意事项_07;

public class Fu {
    public void method01(){}
    public void method02(){}
    public void method03(){}

    //注意,当我们不写权限修饰符时,表示采用默认权限修饰符
    protected void method04(){}

    public Fu method05(){return new Fu();}
}

class Zi extends Fu{
    @Override
    public void method01(){}

    //@Override -- 父类中私有的方法不能被子类重写
    public void method02(){}

    //@Override -- 父类中的静态的方法不能被子类重写
    public void method03(){}
    @Override
    public void method04(){}
    @Override
    public Zi method05(){
        Zi zi = new Zi();
        return zi;
    }
}
